<div class="panel panel-default">
	<div class="panel-heading">Listagem de Vendas</div>
	<div class="panel-body">
		<form name="findForm" class="form-inline" novalidate>
			<div class="form-group" ng-class="{ 'has-error' : findForm.dataIni.$invalid && !findForm.dataIni.$pristine }">
				<label for="dataIni">Data Inicial</label>
				<input type="date" class="form-control" id="dataIni" name="dataIni" placeholder="dd/mm/aaaa" ng-model="dataIni" required/>
				<span class="help-block" ng-show="findForm.dataIni.$invalid && !findForm.dataIni.$pristine">Campo obrigat&oacute;rio!</span>
			</div>
			<div class="form-group" ng-class="{ 'has-error' : findForm.dataFim.$invalid && !findForm.dataFim.$pristine }">
				<label for="dataFim">Data Final</label>
				<input type="date" class="form-control" id="dataFim" name="dataFim" placeholder="dd/mm/aaaa" ng-model="dataFim" required/>
				<span class="help-block" ng-show="findForm.dataFim.$invalid && !findForm.dataFim.$pristine">Campo obrigat&oacute;rio!</span>
			</div>
			<button class="btn btn-primary" id="btnPesquisar" ng-click="find()" role="button" ng-disabled="findForm.$invalid">Pesquisar</button>
		</form>
	</div>
	<table class="table table-striped table-bordered">
		<thead>
			<tr>
				<th>Data da Venda</th>
				<th>Qtd. de Parcelas</th>
				<th>Valor Total</th>
				<th>Funcion&aacute;rio</th>
				<th>Cliente</th>
			</tr>
		</thead>
		<tbody>
			<tr ng-repeat="item in itens">
				<td>{{item.dataVenda|date}}</td>
				<td>{{item.parcelas}}</td>
				<td>{{item.valorTotal|currency}}</td>
				<td>{{item.funcionario.nomeCompleto}}</td>
				<td>{{item.cliente.nomeCompleto}}</td>
			</tr>
			<tr><td colspan="6" ng-hide="itens.length">Nenhum registro encontrado!</td></tr>
		</tbody>
	</table>
</div>